home *** CD-ROM | disk | FTP | other *** search
- unit pager;
-
- interface
- procedure read_strings;
- procedure bar;
- procedure init_asc;
- procedure write_to_log_file;
- procedure menu;
- procedure run_pager;
-
- implementation
-
- {$R-}
- uses crt,
- funct,
- mmenu;
-
- var
- f1 : text;
- l : text;
- i : byte;
- place : byte;
- i2 : integer;
- option : integer;
- options : array[1..3] of string[70];
- choice : char;
- grid_ref : byte;
- cows_come_home : boolean;
- liner : string;
- { lineswap : array[1..16] of string[50];}
- tmp11 : string[50];
-
-
- procedure read_strings;
- var
- strfile : text;
- i3 : byte;
- begin
- i3:=1;
- assign(strfile,'data\strings.txt');
- reset(strfile);
- for i3 := 1 to 3 do
- readln(strfile,options[i3]);
- end;
-
-
- procedure bar;
- begin
- i2:=1;
- place:=10;
- gotoxy(place,10);
- for i2 := 1 to 30 do
- begin
- textcolor(3);
- textbackground(0);
- write('░░');
- delay(100);
- sound(50);
- gotoxy(place,10);
- write('▒▒');
- delay(100);
- delay(150);
- gotoxy(place,10);
- write('▓▓');
- delay(150);
- gotoxy(place,10);
- write('██');
- nosound;
- delay(170);
- place:=place+2;
- end;
- main_menu;
- end;
-
- procedure init_asc;
- var
- ch : char;
- begin
- clrscr;
- { assign(f1,'pager.pcb');
- reset(f1);
- repeat
- read(f1,ch);
- write(ch);
- until eof(f1);}
- send_ansi('page.pcb');
- gotoxy(10,4);
- write(options[1]);
- gotoxy(10,5);
- write(options[2]);
- gotoxy(10,6);
- write(options[3]);
- end;
-
-
- procedure write_to_log_file;
- begin
- assign(l,'\logs\pagelog.dat');
- reset(l);
- append(l);
- writeln(l,'groovyPAGE chat log reason');
- close(l);
- end;
-
-
-
- procedure menu;
- begin
- gotoxy(10,4);
- textcolor(0);
- textbackground(3);
- write(options[1]);
- option:=1;
- grid_ref:=4;
- repeat
- choice:=readkey;
- case choice of
- #13 : if option=1 then begin
- gotoxy(10,8);
- textcolor(3);
- textbackground(0);
- write(options[1]);
- bar;
- end else
- if option=2 then begin
- gotoxy(11,8);
- textcolor(3);
- textbackground(0);
- write(options[2]);
- bar;
- write_to_log_file;
- end else
- if option=3 then begin
- gotoxy(11,8);
- textcolor(3);
- textbackground(0);
- write(options[3]);
- bar;
- end;
-
- #27 : main_menu;
- #80 : begin
- if option<3 then begin
- gotoxy(10,grid_ref);
- textbackground(0);
- textcolor(7);
- write(options[option]);
- inc(grid_ref);
- gotoxy(10,grid_ref);
- textbackground(3);
- textcolor(0);
- writeln(options[option+1]);
- option:=option+1;
- end else begin
- gotoxy(10,grid_ref);
- textcolor(7);
- textbackground(0);
- write(options[3]);
- grid_ref:=grid_ref-2;
- gotoxy(10,grid_ref);
- textbackground(3);
- textcolor(0);
- write(options[1]);
- option:=option-2;
- end;
- end;
- end;
- cows_come_home:=false;
- until cows_come_home;
- end;
-
-
- procedure run_pager;
-
- begin
- textcolor(7);
- textbackground(0);
- clrscr;
- read_strings;
- init_asc;
- { read_data_file;}
- { init_oneliners;}
- menu;
- end;
- end.